let mongoose = require('./db')
const ObjectId = mongoose.Schema.Types.ObjectId


const TagSchema = new mongoose.Schema({
  name: { type:String, required: true, unique: true }, // 分类名称
  desc: String,
  creator: { type: ObjectId, ref: 'Admin', required: true },
}, {
  collection: 'Tag',
  timestamps: true,
})

module.exports = mongoose.model('Tag', TagSchema)